<template>
  <div>

    <FilterForm :data="filterData" @search="getList" label-width="85px" />

    <Table :api="$Api.customer.list" @dbClick="dblclick" ref="Table">
      <el-table-column
        label="编号"
        align="center"
        prop="customerCode"
        width="100"
      />
      <el-table-column
        label="名称"
        align="center"
        prop="customerName"
        width="200"
      />
      <el-table-column
        label="公司全称"
        align="center"
        prop="corporateName"
        width="200"
      />
      <el-table-column
        label="类别"
        align="center"
        prop="supplierType"
        width="80"
      />
      <el-table-column label="联系人" align="center" prop="customerLinkman" />
      <el-table-column label="业务员" align="center" prop="businessPersonnel" />
    </Table>
  </div>
</template>

<script>
export default {
  props:{

  },
  data() {
    return {
      filterData: [
                {
                    label: "类别",
                    name: "customerType",
                    type: "select",
                    select:{
                      option:[{
                              value: '0',
                              label: '地区'
                            }, {
                              value: '1',
                              label: '用途'
                            }
                          ],
                        selectLabel: "label",
                        selectValue: "value",
                        multiple:true
                    },
                },     
                {
                    label: "名称",
                    name: "customerLinkman",
                },
            ],
    };
  },
  methods:{
     /** 查询列表 */
        getList(params) {
            this.$refs.Table.getData(params);
        },
        dblclick(row) {

            let { customerName } = row;
            this.$emit("input", customerName);
            this.selectValue = customerName;
            this.$parent.$emit('cancelClick',this.selectValue)
        },
  }
};
</script>